<legend>Nueva Promesa</legend>
<?php if (isset($this->error)) : ?>
    <?php if ($this->error) : ?>
        <div class="alert alert-error alert-block">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <?php echo $this->mensaje ?>
        </div>
    <?php else : ?>
        <div class="alert alert-success alert-block">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <?php echo $this->mensaje ?>
        </div>
    <?php endif; ?>
<?php endif; ?>

<form name="reserva_form" method="POST" action="<?php echo $this->baseUrl("/usuarios/ajax/guardarpromesa/") ?>"  >
    <input type="hidden" name="cliente_id" value="<?php echo $this->cliente_id ?>" />
    <style>
        td { padding-left: 10px;padding-right: 10px; }
    </style>
    <table class="table">
        <tr>
            <td style="width:180px;">
                <label>Fecha Promesa</label>
                <div class="input-append">
                    <input id="fecha_promesa" name="fecha_promesa" value="" class="input-small" type="text" />
                    <span class="add-on"><i class="icon-calendar"></i></span>
                </div>
            </td>
             
            <td></td>
        </tr>
        <tr>
            <td colspan="4">
                <label>Comentarios</label>
                <div class="controls">
                    <textarea id="comentario" name="comentario" style="width:100%;" rows="4"></textarea>
                </div>
            </td> 
        </tr>
        <tr>
            <td>
                <div class="btn-toolbar">
                    <input value="Guardar" class="btn btn-primary pull-right" type="button  " />
                </div>
            </td>
        </tr>
    </table>
</form>

<script type="text/javascript">
    $(function() {
        $("#fecha_promesa").datepicker({dateFormat: 'dd/mm/yy'});
        <?php if (isset($this->error)) { ?>
            <?php if (!$this->error) { ?>
                    <?php echo $this->script ?>
            <?php } ?>
        <?php } ?>
    });
</script>

<legend style="margin-bottom:5px;line-height:13px;" >
    Promesas
    
</legend>
<table id="tabla_promesas" class="tabla_reducida">
    <thead>
        <tr>
            <th>Fecha llamado</th><th>Usuario</th><th>Observaci&oacute;n</th><th>Fecha Promesa</th><th>Verif. Lab</th><th>Cred.</th>
        </tr>
    </thead>
    <tbody>
        
    </tbody>
</table>
<script type="text/javascript">
    
    $("#tabla_promesas").chromatable({
        width: "100%",  
        height: "150px",
        scrolling: "yes"  
        
    });
    
  
    
 
    
</script>